/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package cn.knet.sp.ncrm.modules.office.notify.entity;

import org.hibernate.validator.constraints.Length;
import cn.knet.sp.ncrm.modules.sys.user.entity.User;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import cn.knet.sp.ncrm.common.persistence.DataEntity;

/**
 * 系统通知、预约提醒记录Entity
 * @author gehaiyang
 * @version 2015-07-20
 */
public class OfficeNotifyRecord extends DataEntity<OfficeNotifyRecord> {
	
	private static final long serialVersionUID = 1L;
	private OfficeNotify officeNotify;		// 通知通告ID
	private User user;		// 接受人
	private String readFlag;		// 阅读标记
	private Date readDate;		// 阅读时间
	
	public OfficeNotifyRecord() {
		super();
	}

	public OfficeNotifyRecord(String id){
		super(id);
	}

	public OfficeNotify getOfficeNotify() {
		return officeNotify;
	}

	public void setOfficeNotify(OfficeNotify officeNotify) {
		this.officeNotify = officeNotify;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@Length(min=0, max=1, message="阅读标记长度必须介于 0 和 1 之间")
	public String getReadFlag() {
		return readFlag;
	}

	public void setReadFlag(String readFlag) {
		this.readFlag = readFlag;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getReadDate() {
		return readDate;
	}

	public void setReadDate(Date readDate) {
		this.readDate = readDate;
	}

}